﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using MBSBusinessEntities;
using System.Transactions;
using MBSVO;

namespace MBSBLC
{
    public partial class BLC
    {
        #region FoodOrder
        public FoodOrderVO getFoodOrderByID(int id)
        {
            FoodOrderBE foodOrderEntity = new FoodOrderBE();
            foodOrderEntity = (FoodOrderBE)foodOrderEntity.GetByID(id);
           
            FoodOrderVO foodOrder =new FoodOrderVO();
            foodOrder.BookingID=foodOrderEntity.BookingID;
            foodOrder.OrderID=foodOrderEntity.OrderID;
            foodOrder.ItemsOrdered=foodOrderEntity.ItemsOrdered;
            foodOrder.Price=foodOrderEntity.Price;

            return foodOrder;
        }

        public int addFoodOrder(int orderId, int bookingId, string itemsOrdered, decimal price)
        {
            FoodOrderBE foodOrderEntity = new FoodOrderBE();
            foodOrderEntity.OrderID = orderId;
            foodOrderEntity.BookingID = bookingId;
            foodOrderEntity.ItemsOrdered = itemsOrdered;
            foodOrderEntity.Price = price;
            return foodOrderEntity.AddOrder();
        }

        public bool deleteFoodOrder(int id)
        {
            FoodOrderBE foodOrderEntity = new FoodOrderBE();
            return foodOrderEntity.Delete(id);

        }


        #endregion
    }
}
